import {defineStore} from 'pinia'

export const useUserStore = defineStore('users', {
    state: () => ({
        user: {
            id: '',
            email: '',
            token: ''
        }
    }),
    actions: {
        SET_USER(user: any) {
            this.user = user;
        },
    },
    persist: {
        storage: localStorage,  // sessionStorage
        paths: ['user']
    }
})